package com.kkb.staticproxy;

import com.kkb.service.IService;

public class ProxyLogService implements IService {
    private IService service;

    public ProxyLogService(IService service) {
        this.service = service;
    }

    @Override
    public void add() {
        try {
            System.out.println("开始日志");
            service.add();
            System.out.println("结束日志");
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println("异常日志");
        }

    }

    @Override
    public void add(int id, String name) {

    }

    @Override
    public boolean update(int num) {
        return false;
    }
}
